<div id="tabsdetail">
  <div class="tabcontents" style="display: block;">
    <form action="javascript:void(0)" method="post">
      <div class="hd">
        <h2>Chi tiết hóa đơn bán</h2>
        
        <?php
			if($data['info'] == FALSE){
				echo "<h4>Không có dữ liệu</h4>";
			}else{
				echo "<table width='100%' class='none'>";
				echo "<tr>";
				echo "<td width='50' style='line-height:1px'><h4>Người lập </h4></td><td width='250'>".$data['info']['ten']."</td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td style='line-height:1px'><h4>Giá tiền </h4></td><td>".@number_format($data['info']['giatien'])." VNĐ</td>";
				echo "</tr>";
				echo "<tr>";
				echo "<td style='line-height:1px'><h4>Số bàn </h4></td><td>".$data['info']['soban']."</td>";
				echo "</tr>";
				echo "<tr>";
				$date = $data['info']['ngay'];
				echo "<td style='line-height:1px'><h4>Ngày lập </h4></td><td>".date("d - m - Y",$date)."</td>";
				echo "</tr>";	
				echo "<tr>";
				echo "<td style='line-height:1px'><h4>Ghi chú </h4></td><td>".$data['info']['ghichu']."</td>";
				echo "</tr>";
				echo "</table>";
			}
		?>
        
        <table id="bachnx_detail">
	       <thead>
	           <tr>
	               <th>STT</th>
	               <th>Tên sản phẩm</th>
	               <th>Số lượng</th>
	               <th>Đơn giá</th>
	               <th>Thành tiền</th>
	           </tr>
	       </thead>
	       <tbody>
	           <?php
	            $total = 0;
				$unserial = $data['info']['chuoi'];
				$serial = unserialize($unserial);
				if(isset($serial) && $serial  != NULL){
				$stt = 0;
				foreach($serial as $value){
					$stt++;
	        ?>
	            <tr class="bachnx_all_row" style="padding-top:20px;">
	            <td><?php echo $stt; ?></td>
	            <td><?php echo $value['name']; ?></td>
	            <td><?php echo $value['qty']; ?></td>
	            <td><?php echo @number_format($value['price'])." VNĐ"; ?></td>
	            <td><?php $total_1 = ($value['price'] * $value['qty']);  echo @number_format($total_1)." VNĐ" ;?></td>
	            </tr>
	            <?php $total = $total + $total_1 ;?>
	        <?php } } ?>
	         <input type="hidden" name="total_cate_price" id="total_cate_price" value="<?php echo $total ?>" />
	       </tbody>
	   </table>
		  </div>
    </form>
  </div>
</div>
<style type="text/css">
.hd table tbody td {text-align: left;}
#bachnx_detail tr td{text-align:center;}
</style>
